package online.longzipeng.mywebdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import online.longzipeng.mywebdemo.entity.BookSensitiveWord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

/**
 * @author lzp
 * 敏感词库mapper
 */
@Mapper
public interface BookSensitiveWordMapper extends BaseMapper<BookSensitiveWord> {

    /**
     * 获取数据库中所有的敏感词
     */
    @Select("SELECT word FROM book_sensitive_word")
    Set<String> listAllWords();
}
